package com.jwater.web.ui.tags;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.AbstractClosingTag;

import com.jwater.web.ui.tag.components.Tab;
import com.opensymphony.xwork2.util.ValueStack;

public class TabTag extends AbstractClosingTag {

	private static final long serialVersionUID = 7690957961999556332L;

	protected String tabsalign="left";

	public void setTabsalign(String tabsalign) {
		this.tabsalign = tabsalign;
	}
	
	@Override
	protected void populateParams() {
		// TODO Auto-generated method stub
		super.populateParams();
		
		Tab tab=((Tab)component);
		tab.setTabsalign(tabsalign);
	}

	@Override
	public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
		return new Tab(stack, req, res);
	}

}
